package com.kob.design.builder;

/**
 * @Description: TODO
 * @Author: fyt
 * @Date: 2024/4/16 9:54
 **/
public class Client {
    public static void main(String[] args) {
        // Builder 加入construct方法
        MBuilder mBuilder = new MBuilder();
        Bike mBike = mBuilder.construct();
        System.out.println(mBike.getSeat());
        System.out.println(mBike.getFrame());

        //construct方法封装到Director
        Director director = new Director(new MBuilder());
        Bike bike = director.construct();
        System.out.println(bike.getFrame());
        System.out.println(bike.getSeat());
    }
}
